Blog search

Friday Facts #199 - The story of tile transitions

Posted by kovarex on 2017-07-14

Hello, version 0.15.30 was released today, and we consider it to be our first 0.15 stable version candidate, as long as no other big bugs appear, we will have 0.15 stable in a week. As the teasing never ends, it is time to show some ongoing work on 0.16 already.

Friday Facts #67 - Happy new year

Posted by kovarex on 2015-01-02

I have to admit that the Factorio development is slowed down these days, but it is not stopped because it just can't stop. Or is it because we can't stop? I guess that we have come too far to give up who we are.

Friday Facts #184 - Five years of Factorio

Posted by kovarex & Rseding on 2017-03-31

Today, it is exactly 5 years since the initial Factorio commit. As you may, or may not know, the first version was created in java, and it took me (kovarex) a whole 12 days to realize that it is not a good idea, and I switched to C++. As a small celebration I provide the Factorio pre-alpha version 0.1 . It is a good reminder of how much the game has moved forward in all directions. The controls are cumbersome, the graphics are funny and glitchy, the GUI is horrible. The campaign has 4 levels, where the last one is quite a challenging defense mission. There are also 2 savegames with one of the first Factorio Factories ever created.

Friday Facts #203 - Logistic buffer chest

Posted by kovarex & Klonan on 2017-08-11

Further optimisations I finished the item stack optimisations mentioned in FFF-198, and was able to do some performance tests. First I tested how many stacks on a big map actually need to use an externally allocated object (Item), and how many of them are plain. On the huge map I tested, it turned out that only 36K out of 1M stacks need the Item object. These were mainly science packs, as they need it for the progress of how used-up they are (and now when I think about it, it could also be omitted by only using the objects for science packs that are partially used up already). Overall factory performance was increased approximately 2% by this. It is nothing huge, but every bit matters. One of the programmer that has read access to the code (Zulan), came up with a pull request that improves performance in Factorio by prefetching memory in the update loops ahead. The problem when normally updating objects is, that CPU asks for memory representing the object. The memory is slow, at least compared to the CPU cache or the CPU speed. The memory transfer speed itself is not that slow, but the waiting (latency) time between ordering and receiving it is. This means, that what very often happens is, that CPU orders data of next entity from the memory, then it waits for quite a long time to get it, and then it does its logic. The memory prefetching partially solves it by doing this: Order data of the next entity from memory (prefetch) Do the logic of the current entity in the meantime Go back to start The overall measured performance improvements vary between 9-12%, which is certainly a nice addition.

Friday Facts #400 - Chart search and Pins

Posted by kovarex, Klonan on 2024-03-01

Hello, Is it me you're looking for?

Friday Facts #228 - High resolution turrets

Posted by posila & V453000 on 2018-02-02

Bugfixing report (posila) Stabilization goes well, the game seems to be quite stable right now (as in - not many crashes are being reported), in fact I think we are at the phase where additional bugfixing makes the game less stable, because more bugs are introduced than fixed, or some critical bug slips through our automated tests. But there are still lot of issues that need to be resolved before we declare 0.16 stable and move on to 0.17 development - the largest issue being belt compression problems. We finally fixed compatibility problem with OS X 10.9 Mavericks after it was broken in 0.15.40, when we updated our development environment to a newer version of boost, and was still broken in 0.16.x despite of us completely replacing boost with standard libraries from a newer version of C++. However, we might drop Mavericks support in 0.17, as we are considering migrating the game to OpenGL 4.1, which won’t be available on Macs that are unable to run a newer version of macOS. Speaking of OpenGL, we have several reports of the game crashing in rendering on Linux when the game is disturbed somehow (for example window resizes, loses focus or user switches workspaces), even though it is terribly inconvenient, the game seems to be otherwise playable on these configurations, and we don’t want to spend a terrible amount of time trying to figure out what is wrong with our current rendering system, when we plan to do complete overhaul of it in 0.17. We will investigate these issues, but they might go unresolved until 0.17. I’ve been looking into some corrupted saves this week, still not being able to figure out how these mysterious corruptions occur. For example this save had two iron ore entities on two different chunks saved with zero entity ID. This could have happened only if those entities had a wrong pointer to the iron ore prototype, so when the game read the ID from the prototype on saving, it would read a value from some random part of memory, or if the ID was corrupted on copying from the prototype to buffer that is saved to disk. Since these kind of corruptions seem to be relatively rare, we suspect it might caused by random hardware failures (maybe cosmic ray hitting a transistor and flipping bit somewhere?), but it would be nice to have some proof it is not some dangling pointer in our code that causes random parts of memory to be overwritten by who knows what. One way to test it would be to check for tile corruptions. Tile data for a chunk is allocated in a 4kB array at the beginning of the chunk. We could create custom allocator for chunks, so that data structure representing chunk is aligned to virtual pages. That way tile data would occupy a whole single virtual page which we could flag as read only. Then, if due to a bug we write over tile data, the OS would crash the game and we would get a stacktrace and crash dump to investigate. But if a cosmic ray would hit the RAM and flip a bit, the corrupted save would still be produced. However, we currently don’t do any custom allocation of virtual pages, so it might be quite hard to implement. We also need to change tiles sometimes (when map generation runs, when player uses concrete or landfill, when a script changes tiles, etc.) and we don’t know how expensive it would be to change pages from read only to read-write and then back to read only. So it might be just easier to spend two hours on fixing a broken save that someone sends us once every week or two.

Friday Facts #198 - Rail segment visualisation

Posted by kovarex on 2017-07-07

Hello, after weeks and weeks of going through bug reports and fixing stuff (after all 0.15 was one of our biggest releases), it seems that we are approaching the end of 0.15 stabilisation. The (wishful) plan is to have a stable candidate for 0.15 next week. Sadly, this will change our attention to just different category of bugs: Those that we plan to fix for the 0.16 as they are not so critical and the changes required to fix them are too big to be done in 0.15 at this point.

Friday Facts #415 - Fix, Improve, Optimize

Posted by Rseding on 2024-06-14

Hello, While a lot of time of 2.0 development has been spent on new features and quality of life, we still take care of the smaller details and technical improvements.

Friday Facts #195 - Poles re-design

Posted by Albert on 2017-06-16

Tomorrow's party Since a couple of weeks ago I was working for the 1M Party. Made some little graphic design jobs which finally became not that little and much more than "some little". I have to admit that I had quite some fun doing them, cause these small things are giving me the chance to experiment and play with the graphical identity of Factorio, like the happy logo variation, the small jumping gear, some layouts, the 1 color version of the Factorio logo and so on. Luckily I finished the jobs with time enough as to come back to the game gfx. But to be honest, Jitka is the person who's really taking care of every single detail for the party, and preparing and organizing everything. She became a master with the stamp and other stuff that I can't reveal just to not spoil surprises.